package com.naiterui.ehp.bs.patient.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 元合家用户信息表(Customer)实体类
 *
 * @author 高亮亮 gll910802@163.com
 * @since 2020-08-27 10:41:26
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "weixin_info")
public class WeixinInfo implements Serializable {
    private static final long serialVersionUID = -64597941499885790L;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;
    /**
     * 头像
     */
    @Column(name = "avatar")
    private String avatar;
    /**
     * 姓名
     */
    @Column(name = "name")
    private String name;
    /**
     * 性别，0：未知；1：男；2：女
     */
    @Column(name = "gender")
    private Integer gender;
    /**
     * 年龄
     */
    @Column(name = "age")
    private Integer age;
    /**
     * 手机
     */
    @Column(name = "phone")
    private String phone;
    /**
     * 小程序openId
     */
    @Column(name = "mini_open_id")
    private String miniOpenId;
    /**
     * 公众号openId
     */
    @Column(name = "mp_open_id")
    private String mpOpenId;
    /**
     * 微信unionId
     */
    @Column(name = "union_id")
    private String unionId;
    /**
     * 账户状态 1:正常，2:禁用
     */
    @Column(name = "account_status")
    private Integer accountStatus;

    @Column(name = "created_at")
    private Date createdAt;

    @Column(name = "changed_at")
    private Date changedAt;

    @Version
    @Column(name = "version")
    private Integer version;
}